package com.umakr.ax.common.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.google.common.collect.Maps;
import com.umakr.ax.common.model.Lable;
import com.umakr.ax.common.mapper.LableMapper;
import com.umakr.ax.core.base.BaseService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标签 服务实现类
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
@Service
public class LableService extends BaseService<LableMapper, Lable>{

    public Object listLableByType(Integer type) {
        int errorCode = 0 ;
        String msg;
        Map<String,Object> data = Maps.newLinkedHashMap();
        EntityWrapper<Lable> codeWrapper = new EntityWrapper<>();
        codeWrapper.eq("lb_type", type);
        List<Lable> list = selectList(codeWrapper);
        errorCode = 1 ;
        msg = "获取成功";
        data.put("list",list);
        return  resultMap(data,errorCode,msg);
    }
}
